package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLThread;

public class HLClassThread extends HLLibClass {
    public HLClassThread(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLThread();
    }

    public void StaticExecute(int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            HLThread.NotifyAll((HLObject)args.GetObject(0));
            break;
        }
        case 1: {
            HLThread.Wait((HLObject)args.GetObject(0));
            break;
        }
        case 2: {
            HLThread.Sleep(args.GetInt(0));
            break;
        }
        }
    }
}
